namespace Xsxiaosa.Net
{
    using System;

    public class FtpTransferProgressEventArgs : EventArgs
    {
        // Methods
        public FtpTransferProgressEventArgs(FtpTransferState state, long bytesTransfered)
        {
            this._state = state;
            if (state == FtpTransferState.None)
            {
                this._bytesTransfered = ((long) 0);
                this._bytesSinceLastEvent = 0;
                return;
            }
            this._bytesTransfered = bytesTransfered;
            this._bytesSinceLastEvent = 0;
        }

        public FtpTransferProgressEventArgs(FtpTransferState state, long bytesTransfered, int bytesSinceLastEvent)
        {
            this._state = state;
            if (state == FtpTransferState.None)
            {
                this._bytesTransfered = ((long) 0);
                this._bytesSinceLastEvent = 0;
                return;
            }
            this._bytesTransfered = bytesTransfered;
            this._bytesSinceLastEvent = bytesSinceLastEvent;
        }


        // Properties
        public long BytesSinceLastEvent
        {
            get
            {
                return ((long) this._bytesSinceLastEvent);
            }
        }

        public long BytesTransfered
        {
            get
            {
                return this._bytesTransfered;
            }
        }

        public FtpTransferState State
        {
            get
            {
                return this._state;
            }
        }


        // Fields
        private int _bytesSinceLastEvent;
        private long _bytesTransfered;
        private FtpTransferState _state;
    }}

